<!DOCTYPE html>
<html>
<head>
<link href="picker.css" rel="stylesheet" type="text/css" />
<script src="jquery-1.3.2.min.js"></script>
<script src="purejstemplate_jquery.js"></script>
<script src="util.js"></script>
<script src="picker.js"></script>
</head>
<body>
<div id="results"></div>

<textarea id="tpl" style="display:none">
  <table border="0" cellpadding="0" cellspacing="0" class="wide forums">
    <tr>
      <th class="la">Name</th>
      <th class="la" width="1%">Rating</th>
      <th class="la" width="1%">Posts</th>
      <th class="la" width="1%">Fans</th>
      <th class="la" width="1%">Installs</th>
      <th class="la" width="12%">Last Updated</th>
    </tr>
    <#
      for(var i = 0; i < data.results.length; i++) {
        var row = data.results[i];
        var star_width = Math.floor((row.average_reviews / 1000) * 12);
    #>
    <tr id="scripts-<#=row.id#>">
      <td class="script-meat">
        <a href="/scripts/show/<#=row.id#>" class="title" title="<#=row.name#>"><#=row.name#></a>
        <p class="desc"><#=row.description#></p>
      </td>
      <td class="inv lp">
        <span class="rating">
          <span class="stars" style="width: <#=star_width#>px"></span>
          <span class="number"><#=row.average_reviews / 1000#></span>
        </span>
        <a href="/scripts/reviews/<#=row.id#>"><#=row.reviews#> reviews</a>
      </td>
      <td class="inv lp"><#=row.posts#></td>
      <td class="inv lp"><#=row.fans#></td>
      <td class="inv lp"><#=row.installs#></td>
      <td class="inv lp">
        <abbr class="updated" title="<#=row.updated_iso8601#>">
          <#=row.updated_formatted#>
        </abbr>
      </td>
    </tr>
    <#
      }
    #>
  </table>
</textarea>
</body>
</html>
